<h2>系统消息&gt; 统计总表</h2>
<script type="text/javascript" src="/js/sms.js"></script>
<script type="text/javascript" src="/js/calendar/WdatePicker.js"></script>
<form action="<?= AdminController::_makeURL('sms','sms','daily_list') ?>" method="post">
<table class="list" cellpadding="0" cellspacing="0" with="100%">
<tr>
	<td>发送消息数</td>
    <td>从<input type="text" name="min"  value="<?=_('min')?>"/> 到  <input type="text" name="max"  <?=_('max')?>/></td>
</tr>
<tr>
	<td>按时间搜索</td>
	<td><span>开始时间：</span>
<input id="start" name="start" class="Wdate" type="text" onFocus="var end=$dp.$('end');WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked:function(){end.focus();},maxDate:'#F{$dp.$D(\'end\')}'})" value="<?=_('start')?>" style="width:150px"/>
<span>结束时间：</span>
<input type="text" id="end" name="end" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'start\')}'});" class="Wdate" style="width:150px" value="<?=_('end')?>"/></td>
</tr>
<tr nowrap="nowrap">
	<td colspan="2" align="center"><input type="submit" value="开始搜索"  /></td>
</tr>
</table>
</form>
<table class="list" cellpadding="0" cellspacing="0" with="100%">
	<thead align="right">
    <td colspan="9">一共<span style="font-size:12px; color:#F00"> <?=$this->ret['data']['total']['sys_total']?></span>条短信</td>
    </thead>
	<thead align="center">
		<td nowrap></td>
		<td nowrap>当日系统消息数</td>
		<td nowrap>发送时间</td>
	</thead>
	<?php $i=1;?>
	<? foreach($this->ret['data']['ret']['ROWS'] as $row):?>
	<tr>
		<td><input type="checkbox" name="sms_id" id="sms_id" value="<?=$row[$i]?>" ></td>
		<td>
			<?php $start = $row['log_date'].' 00:00:00'; $end = $row['log_date'].' 23:59:59';?>
			<a href="<?= AdminController::_makeURL('sms','system','statistic_list',array('min'=>$row['sms_num'],'max'=>$row['sms_num'],'start'=>$start,'end'=>$end)) ?>"><?=$row['sys_total']?></a>
		</td>		
		<td nowrap>
			<?= $row['log_date'] ?>
		</td>
	</tr>
	<?php ++$i;?>
	<? endforeach;?>
</table>
<table class="list" cellpadding="0" cellspacing="0">
	<thead>
    	<td align="right" nowrap>
			<?=$this->ret['data']['pages']?>
        </td>
    </thead>
</table>